Please don't say that something "doesn't work" without specifying what it actually does do. Do you get an error message? If so, post the entire message including window title. Does the dialog open at all? Does it show the wrong documents, or no documents? If the wrong documents, what documents? Does it show the category column? It's better to show your real code, since the problem might not be caused by what you think (e.g. obviously you don't have a constant catagory name hardcoded on your form -- what if the problem is in how you're reading the field value?).
I don't know of a length limit for categories in picklist but I would be surprised if there's a limit less than 255.
Since you actually have two different views, one which has long category names and one which does not, it seems to me that you are just assuming that the length of the category name is the source of your problem. I think you should make very certain the problem is not the content of the category name. Some thoughts:
- Are there multiple consecutive spaces or trailing spaces, tabs, or other unusual whitespace in the category string?
- Are there commas or other list delimiters that may be confusing the issue?
- Is there a "|" character (vertical bar) that's making the value stored in the combobox field different from the value displayed?
- Does your code use the stored value, or the value displayed? You don't actually show how you read the field.
- Are you certain the key value you are using is a string and not, for instance, an array of strings?
- Use the Notes debugger (or DebugStr function and msgbox) to display the value of the category key before you use picklist -- just to make sure it has the value you think it does.
- Write code to iterate thru the top level view entries using NotesViewNavigator.GetFirst and GetNextCategory, and see whether there's one that's equal to your key. I guarantee you the = operator will compare as many characters as are actually in the string.